Electronic Devices with Low-Noise Pressure Sensors

ABSTRACT

An electronic device may include one or more low-noise pressure sensors for measuring air pressure. The electronic device may include wireless communications circuitry for communicating with external devices also having pressure sensors. Pressure data gathered by an external device may be used as reference pressure data for the electronic device. For example, if both devices are located in the same building, both pressure sensors will detect similar pressure fluctuations due to doors opening and closing and temperature-control systems turning on and off. By subtracting the reference pressure data from the pressure data gathered by the electronic device, calibrated pressure data may be obtained and may be used to reliably detect vertical displacement changes of the electronic device. In other scenarios, the pressure data may be compared with the reference pressure data to determine whether the two devices are in the same MOM.

BACKGROUND

This relates generally to electronic devices and, more particularly, toelectronic devices having pressure sensors for gathering informationabout the electronic device and the environment.

Electronic devices often include sensors and other circuitry fordetecting movement of the electronic device and for characterizing itssurroundings. For example, inertial sensors such as an accelerometer orgyroscope are sometimes used to detect a rapid change in acceleration ororientation. Global Positioning System receiver circuitry and/or IEEE802.11 (WiFi®) transceiver circuitry are sometimes used to determinewhere the electronic device is located. Infrared proximity sensors areused to detect when an electronic device is being held against a user'sear during a telephone call so that display and touch sensor circuitrycan be temporarily disable during the call.

However, decisions based on these types of sensors and circuitry may notalways be reliable. Measuring vertical displacement with anaccelerometer requires double integration of accelerometer data, and thenoise associated with the accelerometer data may be too high to do thisreliably. Global Positioning System receiver circuitry typically cannotbe used inside of a building because the building blocks satellitesignals. WiFi®-assisted positioning can be inaccurate due to multiplereflections of the radio signals. Infrared light from an infraredproximity sensor may be absorbed by dark hair, making it difficult todetect the user's head near the electronic device.

It would therefore be desirable to provide improved circuitry andmethods for detecting and characterizing movement of an electronicdevice and the surrounding environment.

SUMMARY

An electronic device may include one or more low-noise pressure sensorsfor measuring air pressure. The electronic device may include wirelesscommunications circuitry for communicating with external devices alsohaving pressure sensors. Pressure data gathered by an external devicemay be used as reference pressure data for the electronic device.

For example, if both devices are located in the same building, bothpressure sensors will detect similar pressure fluctuations due to doorsopening and closing and temperature-control systems turning on and off.By subtracting the reference pressure data from the pressure datagathered by the electronic device, calibrated pressure data may beobtained and may be used to reliably detect vertical displacementchanges of the electronic device.

For example, calibrated pressure data may be synthesized with motionsensor data from a motion sensor in the electronic device to detect andcharacterize movement of the electronic device. For example, thepressure sensor data may be used to detect when a user lifts theelectronic device to his or her ear during a telephone call. If thislift-to-ear event is detected, a display and touch sensor in theelectronic device may be temporarily disabled. If desired, pressuresensor data may be used to track a user's physical activity. Forexample, control circuitry in the electronic device may determine analtitude of the electronic device relative to the external device fromwhich reference pressure data is received. Altitude information may inturn be used to determine a number of flights of stairs climbed by auser.

In other scenarios, the pressure data may be compared with the referencepressure data to determine whether the two devices are in the same room.If two pressure sensors are in the same room, the pressure-versus-timewaveforms produced by the two sensors will reflect similar pressuretransients common to the room. If the two pressure sensors are in thesame building but in different rooms, the pressure-versus-time waveformswill reflect similar long-term changes in pressure common to thebuilding but will detect different short-term fluctuations as a resultof doors opening and closing in the different rooms.

In other scenarios, the pressure data may be used to characterize theenvironment in which the electronic device is being operated. Forexample, pressure data gathered by a pressure sensor in the electronicdevice may exhibit unique characteristics depending on the surroundingenvironment. Such characteristics can be learned and identified suchthat control circuitry in the electronic device can determine whetherthe electronic device is indoors, outdoors, in a car, in an airplane, infree fall, in water, or other environments.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of an illustrative electronic device thatmay be provided with one or more pressure sensors in accordance with anembodiment of the present invention.

FIG. 2 is a schematic diagram of an illustrative electronic device andexternal equipment that may be provided with one or more pressuresensors in accordance with an embodiment of the present invention.

FIG. 3 is a cross-sectional side view of an illustrative pressure sensorformed from a condenser microphone in accordance with an embodiment ofthe present invention.

FIG. 4 is a cross-sectional side view of an illustrative pressure sensorformed from a dynamic microphone in accordance with an embodiment of thepresent invention.

FIG. 5 is a top view of an illustrative array of pressure sensors inaccordance with an embodiment of the present invention.

FIG. 6 is a sectional view of an illustrative building in whichelectronic equipment having pressure sensors may be used in accordancewith an embodiment of the present invention.

FIG. 7 shows illustrative pressure sensor data from first and secondpressure sensors that may be used to determine the altitude of a firstelectronic device relative to a second electronic device in accordancewith an embodiment of the present invention.

FIG. 8 shows illustrative pressure sensor data that may be used tocharacterize a user's movement and activity in accordance with anembodiment of the present invention.

FIG. 9 shows illustrative pressure sensor data from first and secondpressure sensors that may be used to determine whether first and secondelectronic devices are in the same room in accordance with an embodimentof the present invention.

FIG. 10 shows illustrative pressure sensor data from first and secondpressure sensors that may be used to determine whether first and secondelectronic devices are in the same building in accordance with anembodiment of the present invention.

FIG. 11 shows illustrative pressure sensor data that may be used todetermine whether an electronic device is inside or outside inaccordance with an embodiment of the present invention.

FIG. 12 shows illustrative pressure sensor data from first and secondpressure sensors that may be used to detect when a door in a room isopened or closed in accordance with an embodiment of the presentinvention.

FIG. 13 shows illustrative pressure sensor data from first and secondsensors that may be used to determine which door in a given room isopened or closed in accordance with an embodiment of the presentinvention.

FIG. 14 is a flow chart of illustrative steps involved in operating anelectronic device having pressure sensor structures for determining thealtitude of the electronic device relative to another electronic devicein accordance with an embodiment of the present invention.

FIG. 15 is a flow chart of illustrative steps involved in operating anelectronic device having pressure sensor structures for determining thelocation of an electronic device relative to another electronic devicein accordance with an embodiment of the present invention.

FIG. 16 is a flow chart of illustrative steps involved in operating anelectronic device having pressure sensor structures for characterizingthe environment around the electronic device in accordance with anembodiment of the present invention.

DETAILED DESCRIPTION

An illustrative electronic device that may be provided with pressuresensor structures is shown in FIG. 1. Electronic device 10 of FIG. 1 maybe a handheld electronic device or other electronic device. For example,electronic device 10 may be a cellular telephone, media player, or otherhandheld portable device, a somewhat smaller portable device such as awrist-watch device, pendant device, or other wearable or miniaturedevice, gaming equipment, a tablet computer, a notebook computer, adesktop computer, a television, a computer monitor, a computerintegrated into a computer display, or other electronic equipment.

In the example of FIG. 1, device 10 includes a display such as display14. Display 14 has been mounted in a housing such as housing 12. Housing12, which may sometimes be referred to as an enclosure or case, may beformed of plastic, glass, ceramics, fiber composites, metal (e.g.,stainless steel, aluminum, etc.), other suitable materials, or acombination of any two or more of these materials. Housing 12 may beformed using a unibody configuration in which some or all of housing 12is machined or molded as a single structure or may be formed usingmultiple structures (e.g., an internal frame structure, one or morestructures that form exterior housing surfaces, etc.).

Display 14 may be a touch screen display that incorporates a layer ofconductive capacitive touch sensor electrodes or other touch sensorcomponents (e.g., resistive touch sensor components, acoustic touchsensor components, force-based touch sensor components, light-basedtouch sensor components, etc.) or may be a display that is nottouch-sensitive. Capacitive touch screen electrodes may be formed froman array of indium tin oxide pads or other transparent conductivestructures.

Display 14 may include an array of display pixels formed from liquidcrystal display (LCD) components, an array of electrophoretic displaypixels, an array of plasma display pixels, an array of organiclight-emitting diode display pixels, an array of electrowetting displaypixels, or display pixels based on other display technologies. Thebrightness of display 14 may be adjustable. For example, display 14 mayinclude a backlight unit formed from a light source such as a lamp orlight-emitting diodes that can be used to increase or decrease displaybacklight levels and thereby adjust display brightness. Display 14 mayalso include organic light-emitting diode pixels or other pixels withadjustable intensities. In this type of display, display brightness canbe adjusted by adjusting the intensities of drive signals used tocontrol individual display pixels.

Display 14 may be protected using a display cover layer such as a layerof transparent glass or clear plastic. Openings may be formed in thedisplay cover layer. For example, an opening may be formed in thedisplay cover layer to accommodate a button such as button 16. Anopening may also be formed in the display cover layer to accommodateports such as speaker port 18.

In the center of display 14, display 14 may contain an array of activedisplay pixels. This region is sometimes referred to as the active areaof the display. A rectangular ring-shaped region surrounding theperiphery of the active display region may not contain any activedisplay pixels and may therefore sometimes be referred to as theinactive area of the display. The display cover layer or other displaylayers in display 14 may be provided with an opaque masking layer in theinactive region to hide internal components from view by a user.

A schematic diagram of device 10 is shown in FIG. 2. As shown in FIG. 2,electronic device 10 may include control circuitry such as storage andprocessing circuitry 40. Storage and processing circuitry 40 may includeone or more different types of storage such as hard disk drive storage,nonvolatile memory (e.g., flash memory or otherelectrically-programmable-read-only memory), volatile memory (e.g.,static or dynamic random-access-memory), etc. Processing circuitry instorage and processing circuitry 40 may be used in controlling theoperation of device 10. The processing circuitry may be based on one ormore microprocessors, microcontrollers, digital signal processors,baseband processor integrated circuits, application specific integratedcircuits, etc.

With one suitable arrangement, storage and processing circuitry 40 maybe used to run software on device 10 such as internet browsingapplications, email applications, media playback applications, activitylogging applications, fitness applications, operating system functions,software for capturing and processing images, software implementingfunctions associated with gathering and processing sensor data, softwarethat makes adjustments to display brightness and touch sensorfunctionality, etc.

To support interactions with external equipment, storage and processingcircuitry 40 may be used in implementing communications protocols.Communications protocols that may be implemented using storage andprocessing circuitry 40 include internet protocols, wireless local areanetwork protocols (e.g., IEEE 802.11 protocols—sometimes referred to asWiFi®), protocols for other short-range wireless communications linkssuch as the Bluetooth® protocol, etc.

Input-output circuitry 32 may be used to allow input to be supplied todevice 10 from a user or external devices and to allow output to beprovided from device 10 to the user or external devices.

Input-output circuitry 32 may include wired and wireless communicationscircuitry 34. Communications circuitry 34 may include radio-frequency(RF) transceiver circuitry formed from one or more integrated circuits,power amplifier circuitry, low-noise input amplifiers, passive RFcomponents, one or more antennas, and other circuitry for handling RFwireless signals. Wireless signals can also be sent using light (e.g.,using infrared communications). As shown in FIG. 2, circuitry 34 mayinclude one or more radio-frequency transceivers such as cellulartelephone transceiver circuitry 42 (e.g., one or more cellular telephonetransmitters and/or receivers), IEEE 802.11 (WiFi®) transceivercircuitry 44 (e.g., one or more wireless local area network transmittersand/or receivers), Bluetooth® transceiver circuitry 46 such as aBluetooth® Low Energy (Bluetooth LE) transmitter and/or receiver, andsatellite navigation system receiver circuitry 48 (e.g., a GlobalPositioning System receiver or other satellite navigation systemreceiver).

Input-output circuitry 32 may include input-output devices 36 such asbuttons, joysticks, click wheels, scrolling wheels, touch screens, othercomponents with touch sensors such as track pads or touch-sensor-basedbuttons, vibrators, audio components such as microphones and speakers,image capture devices such as a camera module having an image sensor anda corresponding lens system, keyboards, status-indicator lights, tonegenerators, key pads, keyboards and other equipment for gathering inputfrom a user or other external source and/or generating output for auser.

Sensor circuitry such as sensors 38 of FIG. 2 may include an ambientlight sensor for gathering information on ambient light levels,proximity sensor components (e.g., light-based proximity sensors and/orproximity sensors based on other structures), accelerometers,gyroscopes, magnetic sensors, and other sensor structures. Sensors 38 ofFIG. 2 may, for example, include one or more microelectromechanicalsystems (MEMS) sensors (e.g., accelerometers, gyroscopes, microphones,force sensors, pressure sensors, capacitive sensors, or any othersuitable type of sensor formed using microelectromechanical systemstechnology). If desired, other components in device 10 may be formedusing microelectromechanical systems technology.

To detect and characterize movement of electronic device 10 and todetect and characterize the environment around electronic device 10,sensors 38 may be provided with pressure sensor structures 50. Pressuresensor structures 50 (sometimes referred to as pressure sensor circuitry50, pressure sensor array 50, or pressure sensors 50) may include one ormore pressure sensors that measure the air pressure of the surroundingenvironment. Pressure sensors 50 may, for example, include absolutebarometric diaphragm-based pressure sensors formed from piezo-resistorsembedded in a micro-machined silicon diaphragm (sometimes referred to asa piezo-resistive pressure sensor). This is, however, merelyillustrative. If desired, other suitable pressure sensor technology maybe used (e.g., strain gauge based pressure sensors having a metal straingauge on a metal diaphragm, capacitive based pressure sensors having aparallel plate capacitor structure on a diaphragm, other suitablemicroelectromechanical systems based pressure sensors, etc.). Pressuresensor structures 50 may include low-noise pressure sensors (e.g., withRMS noise of about 0.3 Pa or less at 1 atm).

To gather information about electronic device 10 and the surroundingenvironment, electronic device 10 may gather pressure sensor data frompressure sensors in external equipment such as pressure sensorstructures 28 in portable electronic equipment 20 and/or pressure sensorstructures 30 in stationary electronic equipment 26. Electronic device10 may communicate with portable electronic equipment 20 usingcommunications signals 22 and may communicate with stationary electronicequipment 26 using communications signals 24. Communications signals 22and 24 may include Bluetooth® signals, wireless local area signals suchas IEEE 802.11 signals, ultra-wideband radio frequency signals, otherradio-frequency wireless signals, infrared signals, etc. Wirelesssignals 22 and 24 may be used to convey information such as pressuresensor data between electronic device 10 and external equipment 20 and26.

Portable electronic equipment 20 may be an additional electronic devicethat a user of electronic device 10 carries on his or her person, orelectronic equipment 20 may be an electronic device carried by adifferent user (e.g., a user not in possession of electronic device 10).Electronic equipment 20 may be a handheld electronic device or otherportable electronic device. For example, electronic device 20 may be acellular telephone, media player, or other handheld portable device, asomewhat smaller portable device such as a wrist-watch device, pendantdevice, or other wearable or miniature device, an accessory such asearphones, headphones, or earbuds, gaming equipment, a remote control, atablet computer, a notebook computer, a desktop computer, a television,a computer monitor, a computer integrated into a computer display, orother electronic equipment. In one illustrative arrangement which issometimes described herein as an example, electronic device 10 is acellular telephone or other handheld computing device and electronicdevice 20 is a wearable electronic device such as a wrist-watch or apair of headphones. This is, however, merely illustrative. In general,electronic devices 10 and 20 may be any suitable type of electronicequipment.

Stationary electronic equipment 26 may be an infrastructure-relateddevice such as a thermostat, a smoke detector, a Bluetooth® Low Energy(Bluetooth LE) beacon, a WiFi® wireless access point, a server, aheating, ventilation, and air conditioning (HVAC) system (sometimesreferred to as a temperature-control system), a light source such as alight-emitting diode (LED) bulb, a light switch, a power outlet, anoccupancy detector (e.g., an active or passive infrared light detector,a microwave detector, etc.), a door sensor, a moisture sensor, anelectronic door lock, a security camera, or other device that may bestationary within or outside of a building.

Electronic device 10 may gather pressure sensor data from its ownpressure sensor structures 50 and may also gather pressure sensor datafrom external pressure sensors such as pressure sensor structures 28 and30 (sometimes referred to as reference pressure sensors). Pressuresensor data from internal pressure sensors 50 may be compared withreference pressure sensor data from external pressure sensors 28 and/or30 to detect and characterize movement of electronic device 10 relativeto external equipment 20 and 26.

FIG. 3 is a cross-sectional side view of an illustrative pressure sensor60 that may be used in pressure sensor structures 50, 28, and 30. In theexample of FIG. 3, pressure sensor 60 is formed from a modifiedcondenser microphone such as a microelectromechanical systems (MEMS)condenser microphone. Pressure sensor 60 may include a movable membersuch as flexible diaphragm 114 that is suspended over a cavity such ascavity 112 (sometimes referred to as a chamber) using suspension member116. Diaphragm 114 may be free to move relative to a fixed structuresuch as backplate 118 and semiconductor substrate 122. Semiconductorsubstrate 122 may be formed using complementarymetal-oxide-semiconductor (CMOS) technology, n-typemetal-oxide-semiconductor (NMOS) technology, p-typemetal-oxide-semiconductor (PMOS) technology, or other suitablesemiconductor technology.

Semiconductor substrate 122 may include circuitry such as capacitivesensing electrodes that gather signals produced by movement of suspendeddiaphragm 114. Pressure waves that pass through holes 120 in backplate118 will cause diaphragm 114 to move back and forth, causing thedistance between diaphragm 114 and backplate 118 to vary which in turnchanges the capacitance detected by circuitry in substrate 122. Thiscapacitance change can be converted into an electrical signal indicatingthe amplitude of the incoming pressure wave.

To use a condenser microphone as a pressure sensor, differentcharacteristics of the microphone can be modified. The size of cavity112, the area and stiffness of diaphragm 114, and the compressibility ofair in cavity 112 can play a factor in the low frequency response ofsensor 60 and can be adjusted to achieve the desired response. Forexample, in a typical condenser microphone, vents are used for pressureequalization and low frequency roll-off. A vent allows air pressure toequalize between the front and back surfaces of the diaphragm toeliminate any low frequency response. To achieve a better low frequencyresponse, sensor 60 may be formed from an unvented microphone.

The example of FIG. 3 in which sensor 60 is formed from a modifiedmicroelectromechanical systems condenser microphone is merelyillustrative. If desired, sensor 60 may be formed from a modifiedelectret microphone or other suitable microphone. In the example of FIG.4, pressure sensor 60 is formed from a modified dynamic microphone.Pressure sensor 60 includes coil 62 attached to diaphragm 64. Coil 62 isplaced in the magnetic field of permanent magnet 54. When pressure wavescause diaphragm 64 to vibrate, coil 62 moves in the magnetic field ofmagnet 54, thereby producing a current in coil 62 via electromagneticinduction. Pressure sensor 60 may be tuned to have a low frequencyresponse (e.g., less than 1 Hz, less than 2 Hz, less than 5 Hz, etc.) byeliminating or blocking any vents such vent 56. By closing vent 56 (oreliminating the opening entirely), the microphone structure may be usedas a low-noise pressure sensor.

The example of FIG. 4 in which coils 62 are surrounded by magnet 54 ismerely illustrative. If desired, permanent magnet 54 may be located inthe center of sensor 60 and coils 62 may be wrapped around permanentmagnet 54.

FIG. 5 is a top view of another illustrative arrangement for a pressuresensor 60 that may be used in pressure sensor structures 50, 28, and 30.In the example of FIG. 5, pressure sensor 60 is formed from an array ofpressure sensors (e.g., an array of individualmicroelectromechanical-systems-based pressure sensors). Pressure sensors52 may be mounted to a common substrate such as printed circuitsubstrate 56. Processing circuitry such as processing circuitry 54 (orother suitable processing circuitry) may combine sensor signals frompressure sensors 52 to obtain a combined sensor signal. When combiningsensor outputs, the sensor signal increases linearly with the number ofsensors while the noise level of the combined signal increases only withthe square root of the number of sensors. Accordingly, the combinedsensor signal may have a significantly higher signal-to-noise ratio(SNR) than the corresponding signal from a single sensor. For example,in arrangements where sensor array 60 includes 64 pressure sensors 52,the signal will grow by 64 times while the noise will only grow by thesquare root of 64 (8 times), and the overall SNR will be improved by afactor of 8. If desired, individual sensors 52 may be monitored suchthat any failed sensor can be excluded from the signal combiningprocess.

The accuracy of pressure sensors and microphones is compromised by noisesources in the internal electronic circuitry that amplifies, filters,and digitizes the sensed signals. These internal electronic noisesources include principally thermal noise, shot noise, and flickernoise. An additional, often insignificant internal noise source in isproduced by thermal noise from air molecules striking the sensordiaphragm. All of these internal noise sources are uncorrelated with oneanother. The internal noise sources from one sensor are alsouncorrelated with the noise sources from other sensors. Consequently,when combining sensor outputs, the sensor signal increases linearly withthe number of sensors while the noise level of the combined signalincreases only with the square root of the number of sensors.Accordingly, the combined sensor signal may have a significantly highersignal-to-noise ratio (SNR) than the corresponding signal from a singlesensor.

If desired, pressure sensor structures 50 of FIG. 2 may includedifferent types of pressure sensors such as an absolute pressure sensorand an unvented microphone pressure sensor of the type described inconnection with FIG. 3. An absolute pressure sensor typically measuresthe displacement of a diaphragm either through a piezo-resistive straingauge or through a capacitive gap sensor. A microphone typicallyresponds to either the velocity of a diaphragm or to relativelyshort-term changes to the displacement of a diaphragm. Since someabsolute pressure sensors can produce signals with an excessive amountof noise, combining data from an absolute pressure sensor with data froman unvented microphone can provide a more accurate reading of barometricpressure changes. The microphone may provide low noise information aboutshort-term changes in pressure while the absolute pressure sensor canprovide absolute pressure information. Processing circuitry 54 (and/orprocessing circuitry 40 of FIG. 2) can combine pressure sensor signalsby adding the signals together and/or using adaptive filter techniques.

In another suitable arrangement, low-noise pressure sensor data can begathered by combining an absolute sensor with an additional pressuresensor having a sealed chamber behind a diaphragm at 1 atmosphere. Ifdesired, the diaphragm of the additional pressure sensor may be morecompliant than that of the absolute pressure sensor, and mechanicalstops may be used to limit diaphragm displacement under large deviationsfrom 1 atmosphere.

Using the low-noise pressure sensor of FIG. 3, the low-noise pressuresensor of FIG. 4, the low-noise pressure sensor array of FIG. 5, and/orone or more absolute pressure sensors may enable electronic device 10 tomake more intelligent decisions about the movement of electronic device10 and the environment in which electronic device 10 is operating. FIG.6 is a sectional view of an illustrative environment in which a user mayoperate electronic device 10. In this illustrative scenario, user 66 islocated on the first floor of a two-story building 68. User 66 may havemultiple electronic devices such as handheld electronic device 10 andwearable electronic device 20. Building 68 may include stationaryequipment such as equipment 26A on the first floor and equipment 26B onthe second floor. Equipment 26A and 26B may be thermostats, wirelessaccess points, or other suitable electronic equipment described inconnection with FIG. 2. As user 66 moves within building 68, electronicdevice 10 may gather pressure sensor data from its internal pressuresensor (sensor 50 of FIG. 2) and may gather pressure sensor data fromone or more external pressure sensors associated with external equipment20, 26A, and/or 26B. By comparing sensor data from its internal pressuresensor with sensor data from an external pressure sensor, controlcircuitry 40 in electronic device 10 may accurately detect andcharacterize movement of electronic device 10 and may take suitableaction based on how electronic device 10 moves and/or based on theenvironment in which electronic device 10 moves.

For example, control circuitry 40 in electronic device 10 may comparepressure sensor signals from internal pressure sensor 50 with referencepressure signals from an external device (e.g., device 20, 26A, or 26B)to determine an altitude of electronic device 10 relative to theexternal device. When the external device is located in the vicinity ofelectronic device 10, both devices will be subject to similar changes inpressure caused by doors opening and closing, temperature controlsystems turning on and off, etc. Control circuitry 40 may therefore usethe reference pressure signals from the external device to remove thepressure fluctuations common to the environment from the signal frominternal pressure sensor 50.

Vertical displacement information may be used to determine when user 66lifts electronic device 10 to his or her ear, when user 66 climbs aflight of stairs (e.g., stairs 70 of FIG. 6), when user 66 accidentallydrops electronic device 10, and/or when user 66 performs other movementswith electronic device 10. If desired, control circuitry 40 may usepressure sensor data to augment motion sensor data from an inertialsensor in electronic device 10 (e.g., an accelerometer and/or agyroscope) to detect and characterize movement (e.g., altitude changes)of electronic device 10.

As another example, control circuitry 40 in electronic device 10 maycompare pressure sensor signals from internal pressure sensor 50 withreference pressure signals from an external device to determine whetherthe two devices are in the same room or whether the two devices are inthe different rooms in the same building. In other scenarios, controlcircuitry 40 in electronic device 10 may compare pressure sensor signalsfrom internal pressure sensor 50 with a predetermined reference signalstored in electronic device 10 to determine what type of environmentelectronic device 10 is located in (e.g., indoors, outdoors, in a car,in an airplane, in water, etc.).

FIG. 7 shows illustrative sensor data that may be used to determine thealtitude of electronic device 10 relative to an external device such asdevice 20 or device 26 of FIG. 2. The upper graph of FIG. 7 shows sensordata 72 from pressure sensor 1 (e.g., pressure sensor 28 in device 20 orpressure sensor 30 in device 26) and sensor data 74 from pressure sensor2 (e.g., pressure sensor 50 in electronic device 10). From time t0 totime t1, a user holds sensor 1 at the same height relative to sensor 2.From time t1 to time t2, the user lifts sensor 2 several inches abovesensor 1. As shown in the upper graph of FIG. 7, sensor data 72 andsensor data 74 reflect fluctuations in ambient pressure in the room asdoors are opened and closed and as a temperature-control system turns onand off. Sensor data 74 from sensor 2 reflects a drop in pressure fromtime t1 to time t2 as it is lifted above sensor 1.

The lower graph of FIG. 7 illustrates a calibrated sensor signalobtained by subtracting the sensor 2 signal from the sensor 1 signal.Performing this operation removes some of the local atmospheric pressurechanges brought about by doors opening and closing and bytemperature-control systems being turned on and off. The differencesignal may therefore be used to reliably detect when electronic device10 undergoes changes in altitude. Vertical displacement information may,for example, be used to detect when a user lifts electronic device 10 tohis or her ear. If desired, control circuitry 40 in electronic device 10may use pressure sensor data to augment motion sensor data from one ormore inertial sensors in electronic device 10 to determine whenelectronic device 10 is lifted to a user's ear.

FIG. 8 shows illustrative sensor data that may be used to track a user'sphysical activity. The graph of FIG. 8 shows sensor data 78 frompressure sensor 1 (e.g., pressure sensor 28 in device 20) and sensordata 80 from pressure sensor 2 (e.g., pressure sensor 50 in electronicdevice 10). In this illustrative scenario, a user carries both device 10and device 20 on his or her person as various activities are performed.Device 10 may be in the user's pocket, for example, and device 20 may beon the user's wrist.

FIG. 8 illustrates how different characteristics of the pressure versustime waveform can be used to identify the location and activity of theuser as it moves with device 10 and 20. In this illustrative scenario,the user starts in a first building, walks outside to a second building,climbs a set of stairs in the second building, descends back down theset of stairs, and returns to the first building. From time t0 to timet1, the user is located in the first building, and both sensor 1 andsensor 2 detect similar fluctuations in the ambient pressure in thefirst building. From time t1 to time t2, the user walks outside from thefirst building to the second building. When the sensors are outside fromt1 to time t2, the sharp spikes in air pressure that are characteristicof being indoors are not detected. From time t2 to time t3, the user islocated in the second building, and both sensor 1 and sensor 2 detectsimilar fluctuations in the ambient pressure in the second building. Asshown in FIG. 8, the frequency of spikes in air pressure when the useris in the first building is different than the frequency of spikes inair pressure when the user is in the second building. From time t3 totime t4, sensor 1 and sensor 2 detect a stepped decrease in pressure asthe user climbs a flight of stairs in the second building.

FIG. 8 illustrates that, with low-noise pressure sensors in electronicdevice 10, electronic device 10 can detect and characterize movement ofelectronic device 10 and the environment in which electronic device 10moves. The presence or absence of sharp spikes in ambient pressure areindicative of whether the device is indoors or outdoors. The steppeddecrease or increase in pressure is indicative of stairs being ascendedor descended. If desired, control circuitry 40 in electronic device 10may use pressure sensor data (e.g., data of the type shown in FIG. 8)along with sensor data from motion sensors in electronic device 10 tocharacterize and track movement of electronic device 10.

FIG. 9 shows illustrative sensor data that may be used to determinewhether first and second devices are in the same room. The graph of FIG.9 shows sensor data 82 from pressure sensor 1 (e.g., pressure sensor 28in device 20 or pressure sensor 30 in device 26) and sensor data 84 frompressure sensor 2 (e.g., pressure sensor 50 in electronic device 10). Inthis illustrative scenario, both sensor 1 and sensor 2 observe highlycorrelated pressure-versus-time waveforms. Short-term fluctuations aredue to doors opening and closing, while longer term pressure changes aredue to changes from a temperature-control system.

Electronic device 10 may use pressure sensor information (e.g., sensordata of the type shown in FIG. 9) to determine if a user or device islocated within a room or to determine if multiple devices are in thesame room. This information may sometimes be useful for securitypurposes. For example, access to a wireless network may be restricted tothose verified to be physically present in a particular room orbuilding, and access will be blocked to devices located outside thebuilding. Using pressure sensor data to help locate an electronic devicemay be useful in situations where other location detection methods areknown to have difficulties (e.g., indoors where satellite signals areblocked).

FIG. 10 shows illustrative sensor data that may be used to determinewhether first and second devices are in the same building. The graph ofFIG. 10 shows sensor data 86 from pressure sensor 1 (e.g., pressuresensor 28 in device 20 or pressure sensor 30 in device 26) and sensordata 88 from pressure sensor 2 (e.g., pressure sensor 50 in electronicdevice 10). In this illustrative scenario, sensor 1 is inside a 10 by 10foot room in the building, whereas sensor 2 is outside the room in acommon area of the building. Both sensor 1 and sensor 2 detect a slightcontinuous increase in background pressure in the building. Pressuresensor 1, however, detects sharp fluctuations in pressure when the doorto the room is opened and closed, while pressure sensor 2 remainsrelatively stable. FIG. 10 therefore illustrates that pressure sensordata can not only be used to detect whether two devices are in the sameroom, but also to detect whether two devices are in the same buildingbut in different rooms.

FIG. 11 shows illustrative sensor data that may be used to determinewhether an electronic device is inside or outside. The upper graph ofFIG. 11 shows sensor data 92 gathered while sensor 1 (e.g., pressuresensor 50 of electronic device 10) is outdoors, while the lower graph ofFIG. 11 shows sensor data 94 gathered while sensor 1 is indoors. Bothsensor data 92 and sensor data 94 reflect long-term barometric pressurechanges, but sensor data 94 gathered while device 10 is inside alsoreflects short-term pressure transients due to doors opening and closingand temperature-control systems turning on and off.

Control circuitry 40 may compare the gathered pressure sensor data frompressure sensor 50 with one or more predetermined pressure-versus-timewaveforms stored in electronic device 10, may compare the gatheredpressure sensor data with a predetermined threshold stored in electronicdevice 10, and/or may compare the gathered pressure sensor data withreference sensor data from an external pressure sensor. Controlcircuitry 40 may determine what type of environment electronic device 10is operating in and may take suitable action based on the determinedenvironment.

FIG. 12 shows illustrative sensor data that may be used to detect when adoor opens or closes in a room. The upper graph of FIG. 12 shows sensordata 96 from pressure sensor 1 (e.g., pressure sensor 28 in device 20 orpressure sensor 30 in device 26). The middle graph of FIG. 12 showssensor data 98 from pressure sensor 2 (e.g., pressure sensor 50 inelectronic device 10). The lower graph of FIG. 12 shows calibratedsensor data 102 in which sensor data 98 from sensor 2 has beensubtracted from sensor data 96 from sensor 1. In this illustrativescenario, sensor 2 is inside a 10 by 10 foot room in the building,whereas sensor 1 is outside the room in a common area of the building.

As shown in FIG. 12, sensor data from sensor 1 and sensor 2 have similarbackground signals due to short-term pressure transients common to thebuilding. Pressure sensor 2, however, detects sharp fluctuations 100 inpressure when the door to the room is opened and closed, while pressuresensor 2 does not detect such fluctuations. The calibrated waveform 102shows how short-term pressure transients common to the building can beremoved such that fluctuations 100 associated with the opening andclosing of doors are more reliably detected. The momentary decrease inpressure is indicative of a door opening, while the momentary increasein pressure is indicative of a door closing. The magnitude offluctuations 100 depends on the speed at which the door is opened orclosed. Faster door movement gives rise to a larger pressure change overa given time period relative to slower door movement.

FIG. 13 shows illustrative sensor data that may be used to detect whichdoor in a given room is opened or closed. The upper graph of FIG. 13shows sensor data 104 from sensor 1 (e.g., a first stationary sensor 30associated with a first external device 26), the middle graph of FIG. 13shows sensor data 106 from sensor 2 (e.g., a second stationary sensor 30associated with a second external device 26), and the lower graph showscalibrated sensor data 108 in which sensor data 106 from sensor 2 hasbeen subtracted from sensor data 104 from sensor 1. In this illustrativescenario, sensor 1 and sensor 2 may be located in the same building (inthe same room if desired), but sensor 1 may be located further from agiven door in the building than sensor 2. For example, sensor 1 may belocated about 20 feed from the door, whereas sensor 2 may be locatedabout 5 feet from the door.

As shown in FIG. 13, both pressure sensor 1 and pressure sensor 2 detecta drop in pressure when the door is opened, and a rise in pressure whenthe door is closed. However, as shown in the difference signal 108, thepropagation time of sound causes the changes in pressure to be firstrecorded by sensor 2 closer to the door and then recorded by sensor 1further from the door. The difference in arrival time of the pressuretransient causes a characteristic dip 110A and subsequent rise 110B whenthe door is opened, and a characteristic rise 110C and subsequent dip110D when the door is closed. Control circuitry associated with sensors1 and 2 (e.g., control circuitry 40 of electronic device 10 or controlcircuitry in external equipment 20 or 26) may therefore compare thepressure sensor data from multiple pressure sensors in a given room orbuilding to determine where the opened/closed door is relative to thesensors. This information may be useful for occupancy detectionapplications when it is desired to know whether a room is occupied.

FIG. 14 is a flow chart of illustrative steps involved in operating anelectronic device having a pressure sensor for detecting the relativeheight of the electronic device.

At step 200, control circuitry 40 of electronic device 10 may gathersensor data from a first pressure sensor in electronic device 10 (e.g.,sensor 50 of FIG. 2).

At step 202, control circuitry 40 of electronic device 10 may gatherreference data from a second pressure in an external device (e.g.,sensor 28 of device 20 or sensor 30 of device 26). This may include, forexample, receiving the reference data over a wireless communicationspath. The pressure sensor data gathered in step 200 and step 202 mayinclude pressure-versus-time waveforms and may correspond to overlappingperiods of time.

At step 206, control circuitry 40 of electronic device 10 may subtractthe reference data from the sensor data to obtain calibrated sensor datafrom which pressure transients common to both the sensor data and thereference data have been removed.

At step 208, control circuitry 40 of electronic device 10 may determinean altitude of electronic device 10 relative to the external devicebased on the calibrated signal. For example, control circuitry 40 maydetermine that electronic device 10 is lifted by a given verticaldisplacement relative to the external device when the pressure sensordata indicates that electronic device 10 has experienced a decrease inpressure relative to the external device. The magnitude of verticaldisplacement of electronic device 10 relative to the external device canbe calculated from the magnitude of the pressure difference between thefirst and second pressure sensors.

At step 210, control circuitry 40 may take suitable action based on thealtitude of electronic device 10 relative to the external electronicdevice. For example, if the relative altitude change indicates thatelectronic device 10 has been lifted to a user's ear for a telephonecall, control circuitry 40 may temporarily disable the touch sensorand/or display of electronic device 10 so that the user does notinadvertently provide touch input during the telephone call.

As another example, the altitude change may be indicative of exercise orother activity, which in turn can be characterized and logged in anactivity or fitness logging application running on electronic device 10.This may include stair climbing or other movements. For example,electronic device 10 may be on a user's arm or wrist, and the externaldevice may be in the user's pocket or elsewhere in the room. Armmovements performed by the user during exercise may be tracked andlogged using the pressure sensor data gathered during the exercise.

FIG. 15 is a flow chart of illustrative steps involved in operating anelectronic device having a pressure sensor for detecting the relativelocation of the electronic device.

At step 212, control circuitry 40 of electronic device 10 may gathersensor data from a first pressure sensor in electronic device 10 (e.g.,sensor 50 of FIG. 2).

At step 214, control circuitry 40 of electronic device 10 may gatherreference data from a second pressure in an external device (e.g.,sensor 28 of device 20 or sensor 30 of device 26). This may include, forexample, receiving the reference data over a wireless communicationspath. The pressure sensor data gathered in step 212 and step 214 mayinclude pressure-versus-time waveforms and may correspond to overlappingperiods of time.

At step 216, control circuitry 40 may compare the sensor data with thereference data to determine the location of the first device relative tothe second device. This may include, for example, comparing sensor dataof the type shown in FIGS. 8 and 9. In the FIG. 9 example, thepressure-versus-time waveform of the first sensor is nearly identical tothe pressure-versus-time waveform of the second sensor, indicating thatthe two sensors are located in the same room. In the FIG. 10 example,the first and second sensors experience the same slight increase inpressure over a longer period of time, but the first sensor detectsmomentary dips and rises in pressure as a door nearby is opened andclosed. This type of information would indicate that the first andsecond sensors are located in different rooms but may be in the samebuilding.

At step 218, control circuitry 40 may take suitable action based on thelocation of electronic device 10 relative to the external device. Forexample, if control circuitry 40 determines that electronic device 10and the external device are in the same room, electronic device 10 mayprovide a login prompt to the external device, may unlock features orprotected applications in the external device, may synchronize contentwith the external device, may automatically login to the externaldevice, etc.

In other scenarios, the pressure information may be used to determine auser's location indoors, which in turn may be used by activity loggingapplications to track the number of flights of stairs climbed or byother applications that use indoor location information. If desired,pressure sensor data may be combined with other location data (e.g.,from a wireless network, a Global Positioning System receiver, etc.) todetermine where electronic device 10 is located indoors.

FIG. 16 is a flow chart of illustrative steps involved in characterizingthe environment in which a user operates electronic device 10.

At step 220, control circuitry 40 of electronic device 10 may gathersensor data from a pressure sensor in electronic device 10 (e.g., sensor50 of FIG. 2).

At step 222, control circuitry 40 may compare the sensor data withreference data. This may include, for example, comparing sensor data ofthe type shown in FIGS. 10, 11, and 12. The reference data that controlcircuitry 40 uses may be previously gathered sensor data, may be storedreference data having known characteristics of a particular environment,or may be newly gathered sensor data from a pressure sensor in anexternal device.

At step 224, control circuitry 40 may characterize the environment basedon how the sensor data correlates with the reference sensor data. In theexample of FIG. 11, sensor data from the pressure sensor in electronicdevice 10 is used to determine whether electronic device 10 is indoorsor outdoors. In the example of FIG. 12, sensor data from multipleelectronic devices is compared to determine whether a door has beenopened or closed. In the example of FIG. 13, sensor data from multipleelectronic devices is compared to determine which door in a given roomhas been opened or closed.

These examples are merely illustrative of different environments thatcan be detected with pressure sensor 50 of electronic device 10. Inadditional to distinguishing indoors from outdoors, the pressure sensordata may be characteristic to other environments such environments incars, airplanes, moisture, etc. Characterizing the environment may alsoinclude determining whether electronic device 10 is in free fall orwhether a given room is occupied (e.g., whether an intruder has entereda previously empty room).

At step 226, control circuitry 40 may take suitable action based on theenvironment in which electronic device 10 is being operated. Forexample, if the pressure sensor data indicates that electronic device 10is in an airplane, control circuitry 40 may automatically switchelectronic device 10 into airplane mode (e.g., may switch from acellular network to a wireless local area network). If the pressuresensor data indicates that electronic device 10 is in a car, controlcircuitry 40 may automatically switch electronic device 10 intohands-free mode. Electronic device 10 may be automatically switched intosilent mode when the device is indoors, whereas detecting that device 10is outdoors may result in an automatic increase in ringer volume. If thepressure sensor data indicates that a room is occupied that should notbe occupied, electronic device 10 may present an intruder alert to theuser.

The foregoing is merely illustrative and various modifications can bemade by those skilled in the art without departing from the scope andspirit of the described embodiments. The foregoing embodiments may beimplemented individually or in any combination.

What is claimed is:
 1. An electronic device comprising: pressure sensorstructures that gather pressure data; wireless communications circuitrythat receives reference pressure data from a reference pressure sensorin an external device; and control circuitry that determines a locationof the electronic device relative to the external device based on thepressure data and the reference pressure data.
 2. The electronic devicedefined in claim 1 wherein the pressure sensor structures comprise: anarray of microelectromechanical systems pressure sensors; and processingcircuitry that combines signals from the array of microelectromechanicalsystems pressure sensors to produce the pressure data.
 3. The electronicdevice defined in claim 1 wherein the pressure sensor structurescomprises a microphone.
 4. The electronic device defined in claim 3wherein the microphone comprises a low-frequency microphone sensitive tofrequencies below 1 Hz.
 5. The electronic device defined in claim 1wherein the control circuitry subtracts the reference pressure data fromthe pressure data to obtain calibrated pressure data in which backgroundpressure fluctuations are reduced.
 6. The electronic device defined inclaim 5 wherein the control circuitry determines a vertical displacementof the electronic device relative to the external device based on thecalibrated pressure data.
 7. The electronic device defined in claim 6further comprising: a display having a touch sensor, wherein the controlcircuitry temporarily disables the display and the touch sensor based onthe vertical displacement of the electronic device relative to theexternal device.
 8. The electronic device defined in claim 1 wherein thecontrol circuitry detects movement of a door in the vicinity of theelectronic device based on the pressure data and the reference pressuredata.
 9. The electronic device defined in claim 8 wherein the controlcircuitry determines whether the electronic device or the externaldevice is closer to the door based on the pressure data and thereference pressure data.
 10. The electronic device defined in claim 1wherein the control circuitry determines whether the electronic deviceand the external device are located in a common room based on thepressure data and the reference pressure data.
 11. A method foroperating a first electronic device, comprising: with a pressure sensorin the first electronic device, gathering pressure data; with wirelesscommunications circuitry, receiving reference pressure data from apressure sensor in a second electronic device; with control circuitry,subtracting the reference pressure data from the pressure data to obtaincalibrated pressure data; and determining a location of the firstelectronic device relative to the second electronic device based on thecalibrated pressure data.
 12. The method defined in claim 11 whereindetermining the location of the first electronic device relative to thesecond electronic device comprises determining an altitude of the firstelectronic device relative to the second electronic device.
 13. Themethod defined in claim 12 further comprising: with the controlcircuitry, determining a number of flights of stairs climbed by a userbased on the altitude of the first electronic device relative to thesecond electronic device.
 14. The method defined in claim 13 furthercomprising: with a motion sensor in the first electronic device,gathering motion sensor data, wherein the control circuitry uses themotion sensor data and the calibrated pressure data to determine thenumber of flights of stairs climbed.
 15. The method defined in claim 11further comprising: with the control circuitry, detecting when a userlifts the first electronic device to the user's ear based on thelocation of the first electronic device relative to the secondelectronic device.
 16. The method defined in claim 11 wherein the secondelectronic device comprises a wrist-watch device.
 17. The method definedin claim 11 wherein the second electronic device comprises a thermostat.18. An electronic device, comprising: at least one pressure sensor thatgathers pressure data; wireless communications circuitry that receivesreference pressure data from an external device; and control circuitrythat determines where in a building the electronic device is locatedbased on the pressure data and the reference pressure data.
 19. Theelectronic device defined in claim 18 wherein the control circuitrydetermines where in the building the electronic device is located basedon short-term pressure fluctuations in the pressure data and thereference pressure data.
 20. The electronic device defined in claim 18wherein the control circuitry determines whether the electronic deviceand the external device are in a common room in the building based onthe pressure data and the reference pressure data.
 21. The electronicdevice defined in claim 18 wherein the at least one pressure sensorcomprises an array of microelectromechanical systems pressure sensors,the electronic device further comprising: processing circuitry thatcombines signals from the array of microelectromechanical systemspressure sensors to produce the pressure data.
 22. The electronic devicedefined in claim 18 wherein the at least one pressure sensor comprises amicrophone sensitive to frequencies below 1 Hz.